<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>后台欢迎页</title>
    <link rel="stylesheet" href="/static/css/reset.css" />
    <link rel="stylesheet" href="/static/css/content.css" />
</head>
<body marginwidth="0" marginheight="0">
<div class="container">
    <!--    <div class="public-nav">您当前的位置：<a href="{:url('admin/index/index')}">管理首页</a>><a href="">背景音乐管理</a></div>-->
    <div class="public-content">
        <div class="public-content-header">
            <h3>订单管理</h3>
        </div>
        <div class="public-content-cont">
            {if empty($ma_id)}
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/order_add?or_status=1')}">未支付</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/order_add?or_status=2')}">已支付</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/order_add?or_status=3')}">已完成</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/order_add?or_status=4')}">已退款</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/ordermonth?or=1')}">月度表</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/ordermonth?or=2')}">季度表</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/ordermonth?or=3')}">年度表</a>
            {else /}
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/order_add?or_status=1&',array('ma_id'=>$ma_id))}">未支付</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/order_add?or_status=2&',array('ma_id'=>$ma_id))}">已支付</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/order_add?or_status=3&',array('ma_id'=>$ma_id))}">已完成</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/order_add?or_status=4&',array('ma_id'=>$ma_id))}">已退款</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/ordermonth?or=1')}">月度表</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/ordermonth?or=2')}">季度表</a>
            <a style="display:inline-block; border:1px solid #ddd;width:60px;height:24px;line-height:24px;padding:3px;border-radius:5px;" href="{:url('admin/order/ordermonth?or=3')}">年度表</a>
            {/if}

            <form action="{:url('admin/order/order_search')}" method="get">
                <div class="search">
                    <input type="text" placeholder="请输入完整订单号..." name="or_ordersn" value="" />
                    <button><i>搜索</i></button>
                </div>
            </form>
            <table class="public-cont-table">
                <tr>
                    <th style="width:10%">ID</th>
                    <th style="width:10%">订单号</th>
                    <th style="width:10%">金额</th>
                    <th style="width:10%">状态</th>
                    <th style="width:10%">商家名称</th>
                    <th style="width:10%">用户名称</th>
                    <th style="width:20%">支付时间</th>
                    <th style="width:20%">操作</th>
                </tr>
                {foreach $order_list as $key=>$vo}
                <tr>
                    <td>{$vo.or_id}</td>
                    <td>{$vo.or_ordersn}</td>
                    <td>{$vo.or_goodsprice}</td>
                    <td>
                        {if $vo.or_status == '1'}未支付
                        {elseif $vo.or_status == '2'/}已支付
                        {elseif $vo.or_status == '3'/}已完成
                        {else /}已退款
                        {/if}
                    </td>
                    <td>{$vo.ma_name}</td>
                    <td>{$vo.nickname}</td>
                    <td>
                        {if empty($vo.or_paytime)}
                        无
                        {else /}
                        {$vo.or_paytime|date='Y-m-d H:i:s'}
                        {/if}
                    </td>
                    <td>
                        <div class="table-fun">
                            <a style="width: 59px;" href="{:url('admin/order/order_details',array('or_ordersn'=>$vo.or_ordersn))}">订单详情</a>
                            <a href="">删除</a>
                        </div>
                    </td>
                </tr>
                {/foreach}
            </table>
            {$order_list|raw}
        </div>
    </div>
</div>
</body>
</html>